CC=g++
CFLAGS= -c -std=c++0x -pedantic -Wall -Wextra -g -D_GLIBCXX_DEBUG
EXE_SOURCES_CPP= bankTest.cc golfTest.cc rationalmain.cc
EXE_OBJECTS=$(EXE_SOURCES_CPP:.cc=.o)
UTIL_SOURCES_CPP=  bank.cc gcourse.cc ghole.cc gplayer.cc gscore.cc rational.cc
UTIL_OBJECTS= $(UTIL_SOURCES_CPP:.cc=.o) 
OBJECTS=$(UTIL_OBJECTS) $(EXE_OBJECTS) 
EXECUTABLE=bankTest golfTest rationalmain

all: $(EXECUTABLE)

$(EXECUTABLE): $(OBJECTS)
	$(CC) $(LDFLAGS) $(UTIL_OBJECTS)  $@.o -o $@

.cc.o:
	$(CC) $(CFLAGS) $< -o $@ 

clean:
	rm -f *.o ${EXECUTABLE} core 
